# -*- coding: utf-8 -*-
# @Time : 2022-01-25 17:39
# @Author : Z
# @Function :


import yaml

from Common.Logger import path

with open(path + '\examples\log\conf001.yaml', mode='r', encoding="utf-8")  as file:
    cfg1 = yaml.load(stream=file, Loader=yaml.FullLoader)['mysql']
    print(cfg1)
    print(cfg1.get('user'))

# with open(path + '\examples\log\conf001.yaml', mode='r', encoding="utf-8")  as file:
#     cfg2 = yaml.load(stream=file, Loader=yaml.FullLoader).get('nb2')
#     print(cfg2)
#     cfg2['user'] = '123' + cfg2.get('user')
#     print(cfg2)
#     print(cfg2.get('user'))
